<?php 
include('../common.php');
if( $_SESSION['log_levelcode'] != 'KRN')
		header( 'Location: ../logout.php' ) ;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<title><?php echo $lang['PAGE_TITLE']; ?></title>
<link media="screen" rel="stylesheet" type="text/css" href="../css/admin.css"  />
<!--[if lte IE 6]><link media="screen" rel="stylesheet" type="text/css" href="css/admin-ie.css" /><![endif]-->
<!-- aurora-theme is default -->

<link media="screen" rel="stylesheet" type="text/css" href="../css/admin-blue.css"  />

<link rel="stylesheet" href="../js/themes/start/jquery.ui.all.css">
<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script src="../js/external/jquery.bgiframe-2.1.2.js"></script>
<script src="../js/ui/jquery.ui.core.js"></script>
<script src="../js/ui/jquery.ui.widget.js"></script>
<script src="../js/ui/jquery.ui.mouse.js"></script>
<script src="../js/ui/jquery.ui.button.js"></script>
<script src="../js/ui/jquery.ui.draggable.js"></script>
<script src="../js/ui/jquery.ui.position.js"></script>
<script src="../js/ui/jquery.ui.resizable.js"></script>
<script src="../js/ui/jquery.ui.dialog.js"></script>
<script src="../js/ui/jquery.effects.core.js"></script>
<script src="../js/ui/jquery.ui.datepicker.js"></script>
<style>
	body { font-size: 62.5%; }
	input.text { margin-bottom:12px; width:95%; padding: .4em; }
	fieldset { padding:0; border:0; margin-top:25px; }
	h1 { font-size: 1.2em; margin: .6em 0; }
	div#users-contain { width: 350px; margin: 20px 0; }
	div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
	div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
	.ui-dialog .ui-state-error { padding: .3em; }
	.validateTips { border: 1px solid transparent; padding: 0.3em; }
</style>

</head>

<body>
	<script>
		$(function() {

				$('.numbersOnly').keyup(function () { 
					this.value = this.value.replace(/[^0-9\.]/g,'');
				});
				
				$('.delete').click(function () { 
					if(confirmation()){
						return true;
					}
					else{
						return false;
					}
				});
		});

		function confirmation() {
				var answer = confirm("Delete this record?")
				if (answer){
					return true;
				}
				else{
					return false;
				}
		}
	</script>
	<!--[if !IE]>start wrapper<![endif]-->
	<div id="wrapper">
		
		
		<!--[if !IE]>start header main menu<![endif]-->
		
		<div id="header_main_menu">
		<span id="header_main_menu_bg"></span>
		
		<!--[if !IE]>start header<![endif]-->
		<div id="header">
			<div class="inner">
				<h1 id="logo"><a href="#"><?php echo $lang['PAGE_TITLE']; ?></a></h1>
				
				<!--[if !IE]>start user details<![endif]-->
				<div id="user_details">
					<ul id="user_details_menu">
						<li class="welcome"><?php echo $lang['CONTENT_WELCOME']; ?> <strong><?php echo $_SESSION['log_name']; ?></strong></li>
						
						<li>
							<ul id="user_access">
								<li class="first"><a href="pAkaun.php"><?php echo $lang['CONTENT_MY_ACCOUNT']; ?></a></li>
								<li class="last"><a href="../logout.php"><?php echo $lang['CONTENT_LOGOUT']; ?></a></li>
							</ul>
						</li>
						
						
					</ul>
					
					<div id="server_details">
						<dl>
							<dt><?php echo $lang['CONTENT_SERVERTIME']; ?> :</dt>
							<dd><?php echo $today = date("F j, Y, g:i a"); ?></dd>
						</dl>
						<dl>
							<dt><?php echo $lang['CONTENT_SERVERIP']; ?> :</dt>
							<dd><?php  echo $_SERVER['REMOTE_ADDR']; ?></dd>
						</dl>
					</div>
					
				</div>
				
				<!--[if !IE]>end user details<![endif]-->
			</div>
		</div>
		<!--[if !IE]>end header<![endif]-->
		
		<?php
			$curPageName=curPageName();
			//echo "<br/>The current page name is ".curPageName();
		?>
		
		<!--[if !IE]>start main menu<![endif]-->
		<div id="main_menu">
			<div class="inner">
			<ul>
				<li>
				    <?php
					$package = substr($curPageName, 0, 7); //package
					?>
					<a href="packagetransportbydriver.php" <?php if($package == 'package') echo 'class="selected_lk"'; ?> >
						<span class="l"><span></span></span><span class="m"><em><?php echo $lang['CONTENT_PACKAGE']; ?></em><span></span></span><span class="r"><span></span></span>
					</a>
					<?php if($package == 'package'){ ?>
					<ul>
						<li>
							<a href="packagetransportbydriver.php"  <?php if($curPageName=='packagetransportbydriver.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>Manage Transport</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<li>
							<a href="packagebytransport.php" <?php if($curPageName=='packagebytransport.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>Set Transport</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<li>
							<a href="packagesetcompleted.php" <?php if($curPageName=='packagesetcompleted.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>Update Completed</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<li>
							<a href="packagesetcancel.php" <?php if($curPageName=='packagesetcancel.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>Cancel Package</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<li>
							<a href="packagefind.php" <?php if($curPageName=='packagefind.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>Find Package</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<?php 
							if($curPageName=='packageview.php') { ?>
							<li>
								<a href="packageview.php" <?php if($curPageName=='packageview.php') echo 'class="selected_lk"'; ?>>
									<span class="l"><span></span></span><span class="m"><em>View Package</em><span></span></span><span class="r"><span></span></span>
								</a>
							</li>
						<?php } ?>
						<?php 
							if($curPageName=='packageupdate.php') { ?>
							<li>
								<a href="packageupdate.php" <?php if($curPageName=='packageupdate.php') echo 'class="selected_lk"'; ?>>
									<span class="l"><span></span></span><span class="m"><em>Update Package</em><span></span></span><span class="r"><span></span></span>
								</a>
							</li>
						<?php } ?>
						<?php 
							if($curPageName=='packageadd.php') { ?>
							<li>
								<a href="packageadd.php" <?php if($curPageName=='packageadd.php') echo 'class="selected_lk"'; ?>>
									<span class="l"><span></span></span><span class="m"><em>Add Package</em><span></span></span><span class="r"><span></span></span>
								</a>
							</li>
						<?php } ?>
					</ul>
					<?php } ?>
				</li>
				<!--
				<li>
				    <?php
					///#$upload = substr($curPageName, 0, 6); //upload
					?>
					<a href="upload.php" <?php ///#if($upload == 'upload') ///#echo 'class="selected_lk"'; ?> >
						<span class="l"><span></span></span><span class="m"><em><?php ///# echo $lang['CONTENT_UPLOAD']; ?></em><span></span></span><span class="r"><span></span></span>
					</a>
					<?php ///#if($upload == 'upload'){ ?>
					<ul>
						<li>
							<a href="upload.php"  <?php ///#if($curPageName=='upload.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em><?php ///#echo $lang['CONTENT_UPLOAD_MANAGE']; ?></em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<li>
							<a href="uploadpackage.php"  <?php ///#if($curPageName=='uploadpackage.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>Package Uploaded</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
					</ul>
					<?php ///#} ?>
				</li>
				-->
				<li>
				    <?php
					$report = substr($curPageName, 0, 6); //report
					?>
					<a href="reportpackage.php" <?php if($report == 'report') echo 'class="selected_lk"'; ?> >
						<span class="l"><span></span></span><span class="m"><em>Report</em><span></span></span><span class="r"><span></span></span>
					</a>
					<?php if($report == 'report'){ ?>
					<ul>
						<li>
							<a href="reportpackage.php"  <?php if($curPageName=='reportpackage.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>Report Package</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
					</ul>
					<?php } ?>
				</li>
				<li>
				    <?php
					$transport = substr($curPageName, 0, 9); //transport
					?>
					<a href="transport.php" <?php if($transport == 'transport') echo 'class="selected_lk"'; ?> >
						<span class="l"><span></span></span><span class="m"><em>Transport</em><span></span></span><span class="r"><span></span></span>
					</a>
					<?php if($transport == 'transport'){ ?>
					<ul>
						<li>
							<a href="transport.php"  <?php if($curPageName=='transport.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>List Transport</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<li>
							<a href="transportadd.php" <?php if($curPageName=='transportadd.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>Add Transport</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<?php 
						if($curPageName=='transportupdate.php') { ?>
						<li>
							<a href="transportupdate.php" <?php if($curPageName=='transportupdate.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>Update Transport</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<?php } ?>
					</ul>
					<?php } ?>
				</li>
				<li>
				    <?php
					$driver = substr($curPageName, 0, 6); //driver
					?>
					<a href="driver.php" <?php if($driver == 'driver') echo 'class="selected_lk"'; ?> >
						<span class="l"><span></span></span><span class="m"><em>Driver</em><span></span></span><span class="r"><span></span></span>
					</a>
					<?php if($driver == 'driver'){ ?>
					<ul>
						<li>
							<a href="driver.php"  <?php if($curPageName=='driver.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>List Driver</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<li>
							<a href="driveradd.php" <?php if($curPageName=='driveradd.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>Add Driver</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<?php 
						if($curPageName=='driverupdate.php') { ?>
						<li>
							<a href="driverupdate.php" <?php if($curPageName=='driverupdate.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em>Update Driver</em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<?php } ?>
					</ul>
					<?php } ?>
				</li>
				
				<li style="float:right;"><a href="../logout.php" ><span class="l"><span></span></span><span class="m"><em><?php echo $lang['CONTENT_LOGOUT']; ?></em><span></span></span><span class="r"><span></span></span></a>
				
				</li>
				<li style="float:right;">
					<?php
					$pAkaun = substr($curPageName, 0, 6); //pAkaun
					?>
					<a href="pAkaun.php" <?php if($pAkaun == 'pAkaun') echo 'class="selected_lk"'; ?> >
						<span class="l"><span></span></span><span class="m"><em><?php echo $lang['CONTENT_MY_ACCOUNT']; ?></em><span></span></span><span class="r"><span></span></span>
					</a>
					<?php if($pAkaun == 'pAkaun'){ ?>
					<ul>
						<li>
							<a href="pAkaun.php"  <?php if($curPageName=='pAkaun.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em><?php echo $lang['CONTENT_MY_ACCOUNT_UPDATE']; ?></em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
						<li>
							<a href="pAkaunTukarPass.php" <?php if($curPageName=='pAkaunTukarPass.php') echo 'class="selected_lk"'; ?>>
								<span class="l"><span></span></span><span class="m"><em><?php echo $lang['CONTENT_MY_ACCOUNT_PASSWORD']; ?></em><span></span></span><span class="r"><span></span></span>
							</a>
						</li>
					</ul>
					<?php } ?>
				</li>
				
			</ul>
			</div>
			<span class="sub_bg"></span>
		</div>
		<!--[if !IE]>end main menu<![endif]-->
		
		</div>
		<!--[if !IE]>end header main menu<![endif]-->